package com.moyq5.mvc.maker.test.bean.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * 服务器信息
 * @author Moyq5
 * @date 2018年7月26日
 */
@Entity
@Table(name = "sys_server")
@DynamicUpdate
public class SysServer implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	/**
	 * 服务器 ID
	 */
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "native")@GenericGenerator(name = "native", strategy = "native")
    @Column(name = "server_id")
	private Long serverId;
	
	/**
	 * 服务器编号
	 */
	@Column(name = "server_no", length = 50, nullable = false)
	private String serverNo;
	
	/**
	 * 服务器名
	 */
	@Column(name = "name", length = 50, nullable = false)
	private String name;
	
	/**
	 * 服务器地址
	 */
	@Column(name = "host", length = 50, nullable = false)
	private String host;
	
	/**
	 * 服务器端口
	 */
	@Column(name = "port", precision = 6, scale = 0, nullable = false)
	private Integer port;
	
	/**
	 * 内网IP
	 */
	@Column(name = "loip", length = 15, nullable = false)
	private String loip;
	
	/**
	 * 外网IP
	 */
	@Column(name = "exip", length = 15, nullable = false)
	private String exip;
	
	/**
	 * 负载值，设备数量
	 */
	@Column(name = "balance", precision = 10, scale = 0, nullable = false)
	private Integer balance;
	
	/**
	 * 是否在活动
	 */
	@Column(name = "is_active", nullable = false, columnDefinition="tinyint")
	private Boolean isActive;

	/**
	 * 活动时间
	 */
	@Column(name = "active_time", nullable = false, columnDefinition="datetime")
	private Date ActiveTime;

	public Long getServerId() {
		return serverId;
	}

	public void setServerId(Long serverId) {
		this.serverId = serverId;
	}

	public String getServerNo() {
		return serverNo;
	}

	public void setServerNo(String serverNo) {
		this.serverNo = serverNo;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public String getLoip() {
		return loip;
	}

	public void setLoip(String loip) {
		this.loip = loip;
	}

	public String getExip() {
		return exip;
	}

	public void setExip(String exip) {
		this.exip = exip;
	}

	public Integer getBalance() {
		return balance;
	}

	public void setBalance(Integer balance) {
		this.balance = balance;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	public Date getActiveTime() {
		return ActiveTime;
	}

	public void setActiveTime(Date activeTime) {
		ActiveTime = activeTime;
	}

}
